/**
  * @file    :cpp20220404_4.4.5-6_copyconsfuc.cpp
  * @brief   :
  * @author  :renqiang
  * @version :V1.0.0
  * @date    :2022-04-04
  */
#include <iostream>

using namespace std;

class computer
{
    string brand;
    string model;
public:
    computer(string n_brand, string n_model);
    computer(const computer &comp);
    computer();
    // void show();
    // void setcomputer(string brand, string model);
    ~computer();
};

computer::computer(string n_brand, string n_model) : brand(n_brand), model(n_model)
{
    cout << "gou zao le yi ge computer" << endl;
}
computer::computer() : computer("xiaomi", "mi8") //委托构造函数
{
    cout << "wei tuo gou zao le yi ge mo ren phone" << endl;
}

computer::computer(const computer &comp)
{
    brand = comp.brand;
    model = comp.model;
    cout << "copy gou zao le yi ge computer" << endl;
}

// void computer::show()
// {
//     cout << brand << " " << model << endl;
//     cout << "show computer" << endl;
// }


computer::~computer()
{
    cout << "computer is destoryed" << endl;
}


int main()
{
    computer c;
    computer a(c);
    // a.show();
    return 0;
}